export default {
    namespaced: true,
    state() {
        return {
            // 当页面为歌单页播放的歌曲
            songListData: JSON.parse(localStorage.getItem("player_list_song-list")) || "{}",
            // 一共多少首
            countListData: localStorage.getItem("player_list_count")
        }
    },
    mutations: {
        // 更改列表数据
        updateSongListData(state, data) {
            state.songListData = data
            localStorage.setItem("player_list_song-list", state.songListData)
        },
        updateCountListData(state, count) {
            state.countListData = count
            localStorage.setItem("player_list_count", state.countListData)
        }
    }
}